package org.company.management.utilities;

/**
 * @author Paner
 *
 */
public class VariableUtils
{
	public static boolean isNull(String object)
	{
		boolean isNullVar = false;
        if(object == null)
        {
        	isNullVar = true;
        }
        
        return isNullVar;
    }

    public static boolean isNullOrEmpty(String object)
    {
    	boolean isNullOrEmptyVar = false;
        if (isNull(object) || object.trim().length() == 0)
        {
        	isNullOrEmptyVar = true;
        }
        return isNullOrEmptyVar;
    }
    
    public static boolean isFloat(String value)
	{
		boolean isFloat = true;
		try
		{
			Float.parseFloat(value);
		}
		catch(NumberFormatException nfe)
		{
			isFloat = false;
		}
		
		return isFloat;
		
	}
    
    public static boolean isInteger(String value)  
    {
    	boolean isInteger = true;
         try  
         {  
             Integer.parseInt(value);  
         }
         catch(NumberFormatException nfe)  
         {  
        	 isInteger = false;  
         } 
         
         return isInteger;
    }
    
}
